package com.iris.live.services.data.repositories;

import com.iris.live.services.data.models.Lsh金融申请Model;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * Created by sxy on 2016/7/11.
 */
public interface Lsh金融申请表Repository extends JpaRepository<Lsh金融申请Model, Integer>, JpaSpecificationExecutor<Lsh金融申请Model> {

    @Query("select u from Lsh金融申请Model u  where  u.状态 ='批复通过' ")
    List<Lsh金融申请Model> getitemByfkanddetai();

    @Query("select u from Lsh金融申请Model u  where  u.初始报价单号 =?1 ")
    Lsh金融申请Model getApplyFinanceModelByIds(String dd);

    @Modifying
    @Query("update Lsh金融申请Model a set a.状态=?1 where a.初始报价单号=?2")
    void updateFinByQuote(String status, String quote);
}
